<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1">
               <link rel="stylesheet" href="Bootstrap/css/bootstrap.min.css">
		<script src="Bootstrap/js/jquery-1.11.1.min.js"></script>
		<script src="Bootstrap/js/bootstrap.min.js"></script>
        <style type="text/css">
        body,html{
            font-family: "微软雅黑";
            color:gray;
        }.bottom-menu{
    border-top:1px solid #D3D3D3;
        margin: 0 auto;
        position: fixed;
        bottom: 0;
        text-align: center;
        background:#33CCCC;
    }

    .bottom-menu td{
        padding-top: 6px;
        font-size: 13px;
        height: 50px;
        width: 200px;
    }.bottom-menu a{
    color:#ffffff;
    }.my-center{
    text-align: center;
    }
    .release-list{
    	background: gray;
    }
.input-group {
	width: 99%;
}.list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover {
            background-color: #33CCCC;
            border: 0px;
        }
    </style>
    </head>
    <body>
        <!--列表组-->
            <a class="list-group-item active my-center" style="background:#33CCCC ;border: 0"> 我要发布</a>
                <div class="release-list">
        		<div style="text-align: center;background: white;">
        	<form method="post" enctype="multipart/form-data">
			<div class="panel-body">
				<div class="input-group">
					<!--<span class="input-group-addon">信息主题</span>-->
                    <input type="text"
						class="form-control" placeholder="输入招聘信息主题" maxlength="15"  id="title" name="title">
				</div>
				<br> 
				<div class="input-group">
					<textarea class="form-control" rows="8"  name="release1" placeholder="主要招聘信息内容" id="employment"></textarea>
				</div>
			<br>
                <div class="input-group">
                    <span class="input-group-addon">上传附件</span>
                    <input type="file" name="fileName" id="file" class="form-control">
                </div>
                <br>
                <div class="input-group">
                    <span class="input-group-addon">开始时间</span> <input type="date" name="starttime" class="form-control">
                </div>
                <br>
                <div class="input-group">
                    <span class="input-group-addon">截止时间</span> <input type="date" name="endtime" class="form-control">
                </div>
                <br>
				<div style="text-align: center;">
					<button type="button" style="background-color: #33CCCC;border-color:#6699cc;" class="btn btn-danger" onclick="release();" id="btn">发布</button>
					<button type="reset"  class="btn btn-default">重新输入</button>
				</div>
			</div>
		</form>
<script type="text/javascript">
    function release() {
        var user = JSON.parse(localStorage.user);
        if(user == null){
            location.href = "login.html";
        }
        uid = user.id;
        var data = $("form").serialize();
        $.ajaxFileUpload({
            url:"http://localhost:8080/zp/releaseUpload?user_id="+uid+"&"+data,
            secureuri:false,
            fileElementId:"file",
            data:data,
            datatype:"json",
            type:"post",
            success:function (data,status) {
                alert("发布成功");
                location.href = "index.html";
            },
            error:function(data,status,e){
            }
        })

    }
</script>

                    <script src="js/ajaxfileupload.js"></script>
        </div>
        	</div>

<!--    //<a href="download/携程.zip">下载携程.zip</a>-->
        <!--底部导航菜单开始-->
	<div class="bottom-menu">
		<table>
			<tr>

				<td><a href="index.html"><span class="glyphicon glyphicon-home"></span>
						<br>首页</a></td>
				<td><a href="release.html"  style="color:#66ffff;"><span class="glyphicon glyphicon-pencil"></span><br>我要发布</a></td>
				<td><a href="my_collect.html"><span class="glyphicon glyphicon-star"></span><br>我的收藏</a></td>
				<td><a href="mypage.html"><span class="glyphicon glyphicon-th-list"></span><br>个人中心</a></td>
			</tr>
		</table>
	</div>
	<!--底部导航菜单结束-->

    </body>
</html>